package com.csun.dsms.controller;


import com.csun.dsms.comment.core.utils.wrapper.WrapMapper;
import com.csun.dsms.comment.core.utils.wrapper.Wrapper;
import com.csun.dsms.model.domain.DsmsHealthReport;
import com.csun.dsms.model.dto.healthReport.HealthReportDTO;
import com.csun.dsms.model.dto.healthReport.HealthReportVO;
import com.csun.dsms.service.DsmsHealthReportService;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/healthReport")
public class DsmsHealthReportController {
    @Resource
    private DsmsHealthReportService healthReportService;


    // 健康报表
    @PostMapping(value = "/list")
    public Wrapper queryHealthReport(@RequestBody HealthReportDTO healthReportDTO) {

        PageInfo pageInfo = healthReportService.queryListWithPage(healthReportDTO);

        return WrapMapper.wrap(Wrapper.SUCCESS_CODE, "", pageInfo);
    }


}
